<?php
 $data = '29-04-1986'; 
 echo ereg_replace("([0123]?[0-9])[/.-]([01]?[0-9])[/.-]([0-9]{2}([0-9]{2})?)","\\3-\\2-\\1",$data);

?>

